package com.atguigu.gmall.service.impl;

import com.atguigu.gmall.bean.Person;
import com.atguigu.gmall.service.PersonService;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @author Jerry.Su
 * @Date 2022/2/17 16:27
 */
public class PersonServiceImpl implements PersonService {
    @Override
    public List<Person> getPersonListByOrderId(String orderId) {
        int num = new Random().nextInt(10);
        List<Person> persons = new ArrayList<>();
        for (int i = 0; i < num; i++) {
            persons.add(new Person(new Random().nextInt(30), "jerry" + i, new Random().nextInt(2) > 0 ? "女" : "男"));
        }
        return persons;
    }
}
